package com.rcd.viatornisl.android.model;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

public class BaseManager {

	private String _BaseUrl;
	public static final int JOIN_TIMEOUT = 3000;
	
	protected String getBaseUrl() {
		return this._BaseUrl;
	}

	protected void setBaseUrl(String baseUrl) {
		this._BaseUrl = baseUrl;
	}
	
	protected static String convertInputStreamToString(InputStream inputStream) throws IOException {
		// Local variables
		BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
		String line = "";
		String result = "";

		// For each line
		while ((line = bufferedReader.readLine()) != null)
			// Add
			result += line;

		// Close the stream
		inputStream.close();

		// Provide the result
		return result;
	}
	
}
